package com.neiquan.neiquandemo.test;

import android.content.Intent;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.neiquan.neiquandemo.R;

import net.neiquan.applibrary.barlibrary.ImmersionBar;
import net.neiquan.applibrary.base.BaseActivity;

import butterknife.InjectView;
import butterknife.OnClick;

public class ImmersionBarActivity extends BaseActivity {

    @InjectView(R.id.drawer)
    DrawerLayout drawer;
    @InjectView(R.id.top_view)
    View topView;
    @InjectView(R.id.toolbar)
    Toolbar toolbar;
    @InjectView(R.id.iv_bg)
    ImageView iv_bg;
    @InjectView(R.id.tv_version)
    TextView tv_version;
    private ImmersionBar mImmersionBar;


    @OnClick({R.id.btn_pic, R.id.btn_scroll, R.id.btn_coordinator, R.id.btn_white_status_bar})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.btn_pic:
                startActivity(new Intent(this, PicActivity.class));
                break;
            case R.id.btn_scroll:
                startActivity(new Intent(this, ScrollTitleActivity.class));
                break;
            case R.id.btn_coordinator:
                startActivity(new Intent(this, CoordinatorActivity.class));
                break;
            case R.id.btn_white_status_bar:
                startActivity(new Intent(this, WhiteStatusBarActivity.class));
                break;
        }
    }

    @Override
    public int getRootViewId() {
        return R.layout.activity_immersionbar;
    }

    @Override
    public void setViews() {
        mImmersionBar = ImmersionBar.with(this);
        mImmersionBar.init();
//        mImmersionBar.statusBarView(R.id.top_view)
//                .statusBarColor(R.color.colorPrimary)
//                .init();
        mImmersionBar.titleBar(R.id.top_view).init();
//        mImmersionBar.titleBar(R.id.toolbar).init();
        //设置fragment的标题栏
//        ImmersionBar.setTitleBar(getActivity(), mToolbar);
    }

    @Override
    public void initData() {

    }
}
